package com.liu.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Information {
    @TableId(type = IdType.AUTO)
    @Alias("ID")
    private Integer id;
    @Alias("标题")
    private String title;
    @Alias("日期")
    @JsonSerialize(using = com.liu.entity.CustomDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date date;
    @Alias("作者")
    private String author;
    @Alias("内容")
    private String content;
    @Alias("封面")
    private String cover;
}
